using System;
using System.IO;
using System.Text;

public class Generator1
{

    private class MyStringGenerator
    {
        Random random;

        public MyStringGenerator()
        {
            random = new Random();
        }

        public char[] nextChars(int length = 8)
        {
            var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
            char[] stringChars = new char[length];

            for (int i = 0; i < stringChars.Length; i++)
                stringChars[i] = chars[random.Next(chars.Length)];

            return stringChars;
        }

        public string nextString(int length = 8)
        {
            return new String(nextChars(length));
        }

        public byte[] nextBytes(int length = 8)
        {
            return Encoding.ASCII.GetBytes(nextChars(length));
        }
    }

    private class GegevensFileStream : FileStream
    {
        MyStringGenerator randomGenerator;

        public GegevensFileStream(int i) : base(string.Format("gegevens{0}.txt", i), FileMode.Create)
        {
            randomGenerator = new MyStringGenerator();
        }

        public void schrijf(int regels = 190)
        {
            for (int i = 0; i < regels; i++)
            {
                Write(randomGenerator.nextBytes(77), 0, 77);
                Write(new byte[] { 0x0d, 0x0a }, 0, 2);
            }
        }
    }

    public Generator1()
    {
        GegevensFileStream fs;
        Random rnd = new Random();

        for (int i = 0; i < 20; i++)
        {
            fs = new GegevensFileStream(i);
            fs.schrijf(rnd.Next(80000, 800000));
            fs.Dispose();
        }
    }

    public static void Main()
    {
        new Generator1();
    }
}